package com.chain.BrotherExchange.data.model;

import com.chain.BrotherExchange.R;

import java.util.List;

public class Quotation extends BaseResponseModel<Quotation.DataBean> {


    public static class DataBean {
        private List<ListBean> list;

        public List<ListBean> getList() {
            return list;
        }

        public DataBean() {
        }

        public DataBean(List<ListBean> list) {

            this.list = list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean {
            public ListBean(String symbol, String price, String scope, String amount, String cny_price) {
                this.symbol = symbol;
                this.price = price;
                this.scope = scope;
                this.amount = amount;
                this.cny_price = cny_price;
            }

            public ListBean() {
            }

            /**
             * symbol : ETH/SDC
             * price : 1
             * scope : -99.98
             * low : 1
             * high : 5184
             * amount : 30
             * cny_price : 1418.859
             * cny_low : 1418.859
             * cny_high : 1418.859
             * token_trade_id : 3
             */

            private String symbol;
            private int token_id;
            private String price;
            private String scope;
            private String low;
            private String high;
            private String amount;
            private String cny_price;
            private String cny_low;
            private String cny_high;
            private int token_trade_id;

            public int getScopeBackground() {
                if (scope.contains("-")) {
                    return R.drawable.shape_rose_plate;
                }

                return R.drawable.shape_rect_drop;
            }

            public int getToken_id() {
                return token_id;
            }

            public void setToken_id(int token_id) {
                this.token_id = token_id;
            }

            public String getSymbol() {
                return symbol;
            }

            public void setSymbol(String symbol) {
                this.symbol = symbol;
            }

            public String getPrice() {
                return price;
            }

            public void setPrice(String price) {
                this.price = price;
            }

            public String getScope() {
                return scope + "%";
            }

            public void setScope(String scope) {
                this.scope = scope;
            }

            public String getLow() {
                return low;
            }

            public void setLow(String low) {
                this.low = low;
            }

            public String getHigh() {
                return high;
            }

            public void setHigh(String high) {
                this.high = high;
            }

            public String getAmount() {
                return amount;
            }

            public void setAmount(String amount) {
                this.amount = amount;
            }

            public String getCny_price() {
                return "¥ " + cny_price;
            }

            public void setCny_price(String cny_price) {
                this.cny_price = cny_price;
            }

            public String getCny_low() {
                return cny_low;
            }

            public void setCny_low(String cny_low) {
                this.cny_low = cny_low;
            }

            public String getCny_high() {
                return cny_high;
            }

            public void setCny_high(String cny_high) {
                this.cny_high = cny_high;
            }

            public int getToken_trade_id() {
                return token_trade_id;
            }

            public void setToken_trade_id(int token_trade_id) {
                this.token_trade_id = token_trade_id;
            }

            public String getScopeColor() {
                if (scope.contains("-")) {
                    return "#FF6966";
                }

                return "#33CCB3";
            }
        }
    }
}
